<template>
    <view class="list" @tap="toPageDetail(goods_id)">
        <image mode="widthFix" :src="goods_small_logo || '/static/empty.png'"></image>
        <view class="list_right">
            <view class="name">{{goods_name}}</view>
            <view class="price" v-if="goods_price">{{goods_price}}</view>
        </view>
    </view>
</template>

<script>
export default {
    props:{
        goods_id: {
            type: Number,
        },
        goods_small_logo:{
            type:String
        },
        goods_name:{
            type:String
        },
        goods_price:{
            type:Number
        }
    },
    data(){
        return{

        };
    },
    methods:{
        toPageDetail(goods_id){  
            uni.navigateTo({
		          url: '/pages/goods_detail/index?goods_id=' + goods_id,
          })
    }
    }
}
</script>

<style lang="less" scoped>
.list{
    display: flex;
    width: 698rpx;
    height: 209rpx;
    padding: 0 26rpx;
    image{
      width: 191rpx;
      height: 191rpx;
    }
    .list_right{
      display: flex;
      flex-direction: column;
      justify-content: space-around;
      padding-left: 26rpx;
      flex: 1;
      .name{
        width: 463rpx;
        height: 66rpx;
        font-size: 25rpx;
        color: #696969;
      }
      .price{
        color: #ee6973;
        font-size: 23rpx;
      }
    }
    }
</style>